<template>
  <ConvertLayout :standard="standard" :initial="initial" :selectOptionsList="selectOptionsList" />
</template>

<script setup lang="ts">
import ConvertLayout from "../layout/ConvertLayout.vue";

// 光强换算的标准
const standard = {
  label: "米(m)",
  value: 1,
};
// 光强换算的初始值
const initial = {
  label: "厘米(cm)",
  value: 100,
};

// 进制换算的数值类型
const selectOptionsList: ConvertOptionsType = [
  {
    type: "group",
    label: "公制",
    key: "公制",
    children: [
      {
        label: "千米(km)",
        value: "千米(km)",
        num: 0.001,
        disabled: false,
      },
      {
        label: "米(m)",
        value: "米(m)",
        num: 1,
        disabled: false,
      },
      {
        label: "分米(dm)",
        value: "分米(dm)",
        num: 10,
        disabled: false,
      },
      {
        label: "厘米(cm)",
        value: "厘米(cm)",
        num: 100,
        disabled: false,
      },
      {
        label: "毫米(mm)",
        value: "毫米(mm)",
        num: 1000,
        disabled: false,
      },
      {
        label: "微米(um)",
        value: "微米(um)",
        num: 1000000,
        disabled: false,
      },
      {
        label: "纳米(nm)",
        value: "纳米(nm)",
        num: 1e9,
        disabled: false,
      },
      {
        label: "皮米(pm)",
        value: "皮米(pm)",
        num: 1e12,
        disabled: false,
      },
      {
        label: "光年(ly)",
        value: "光年(ly)",
        num: 1.06e-16,
        disabled: false,
      },
      {
        label: "天文单位(AU)",
        value: "天文单位(AU)",
        num: 6.68e-12,
        disabled: false,
      },
      {
        label: "公里(km)",
        value: "公里(km)",
        num: 0.001,
        disabled: false,
      },
      {
        label: "公尺(m)",
        value: "公尺(m)",
        num: 1,
        disabled: false,
      },
      {
        label: "公分(cm)",
        value: "公分(cm)",
        num: 100,
        disabled: false,
      },
    ],
  },
  {
    type: "group",
    label: "英制",
    key: "英制",
    children: [
      {
        label: "英寸(in)",
        value: "英寸(in)",
        num: 39.37,
        disabled: false,
      },
      {
        label: "英寸(in)",
        value: "英寸(in)",
        num: 39.37,
        disabled: false,
      },
      {
        label: "英尺(ft)",
        value: "英尺(ft)",
        num: 3.28,
        disabled: false,
      },
      {
        label: "码(yd)",
        value: "码(yd)",
        num: 1.09,
        disabled: false,
      },
      {
        label: "英里(mi)",
        value: "英里(mi)",
        num: 0.000621,
        disabled: false,
      },
      {
        label: "海里(nmi)",
        value: "海里(nmi)",
        num: 0.00054,
        disabled: false,
      },
      {
        label: "英寻(fm)",
        value: "英寻(fm)",
        num: 0.547,
        disabled: false,
      },
      {
        label: "弗隆(fg)",
        value: "弗隆(fg)",
        num: 0.00497,
        disabled: false,
      },
      {
        label: "密耳(mil)",
        value: "密耳(mil)",
        num: 39370.08,
        disabled: false,
      },
    ],
  },
  {
    type: "group",
    label: "市制",
    key: "市制",
    children: [
      {
        label: "里",
        value: "里",
        num: 0.002,
        disabled: false,
      },
      {
        label: "丈",
        value: "丈",
        num: 0.3,
        disabled: false,
      },
      {
        label: "尺",
        value: "尺",
        num: 3,
        disabled: false,
      },
      {
        label: "寸",
        value: "寸",
        num: 30,
        disabled: false,
      },
      {
        label: "分",
        value: "分",
        num: 300,
        disabled: false,
      },
      {
        label: "厘",
        value: "厘",
        num: 3000,
        disabled: false,
      },
      {
        label: "毫",
        value: "毫",
        num: 30000,
        disabled: false,
      },
    ],
  },
];
</script>
